Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): maintain status bar color during splash #2603

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

sbannigan
Copy link
Contributor

This fixes #1761 so the splash screen doesn't override the status bar color when it's visible. The reason this was broken was the flags were not getting applied from the window properly. It should have been:

a.getWindow().getAttributes().flags | (WindowManager.LayoutParams.FLAG_FULLSCREEN);

instead of

a.getWindow().getAttributes().flags & (WindowManager.LayoutParams.FLAG_FULLSCREEN);

but the fullscreen flag was replicating the behavior of the splashFullScreen config, so I removed it.

splashImage.setFitsSystemWindows(true); is required so the splash screen does not appear behind the action bar.

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks!

@jcesarmobile jcesarmobile changed the title fix(android/splash): fixes #1761 maintain status bar color on splash fix(android): maintain status bar color during splash Mar 19, 2020
@jcesarmobile jcesarmobile merged commit 59fcf9e into master Mar 19, 2020
@jcesarmobile jcesarmobile deleted the fix/android-splash-screen-status-bar-style branch March 19, 2020 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Splash Screen Messing Status Bar Color/Style
2 participants